package com.qqs.distributed.bean;

import java.util.ArrayList;
import java.util.List;

public class Dog {
    private Integer id;
    private Integer age;
    private String name;
    private List<Person> ps = new ArrayList<>();

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Person> getPs() {
        return ps;
    }

    public void setPs(List<Person> ps) {
        this.ps = ps;
    }

    @Override
    public String toString() {
        return "Dog{" +
                "id=" + id +
                ", age=" + age +
                ", name='" + name + '\'' +
                ", ps=" + ps +
                '}';
    }

    public static class Person {
        private Integer pId;
        private Integer pAge;
        private String pName;

        public Integer getpId() {
            return pId;
        }

        public void setpId(Integer pId) {
            this.pId = pId;
        }

        public Integer getpAge() {
            return pAge;
        }

        public void setpAge(Integer pAge) {
            this.pAge = pAge;
        }

        public String getpName() {
            return pName;
        }

        public void setpName(String pName) {
            this.pName = pName;
        }

        @Override
        public String toString() {
            return "Person{" +
                    "pId=" + pId +
                    ", pAge=" + pAge +
                    ", pName='" + pName + '\'' +
                    '}';
        }
    }
}
